Fix another new/xfree mismatch.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 6 Sep 2013 19:40:51 +0000 (19:40 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 6 Sep 2013 19:40:51 +0000 (19:40 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4592 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/gpx.cc
gpsbabel/src/core/xmltag.h
gpsbabel/text.cc

index bb472e51520623faad3dce142eab48147d0805fa..d7a2ade69336271185fd320b5a0ce09b51e0fe8b 100644 (file)
@@ -1402,7 +1402,7 @@ void free_gpx_extras(xml_tag* tag)
     }
 
     next = tag->sibling;
-    xfree(tag);
+    delete tag;
     tag = next;
   }
 }
index eba34eb6a3e52b20471e3b21bb00fc20577ad6e8..dadab96bcaff1226ebf61d7c62bd728e6b639f90 100644 (file)
@@ -35,9 +35,9 @@ class xml_tag {
   char* parentcdata;
   int parentcdatalen;
   char** attributes;
-  struct xml_tag* parent;
-  struct xml_tag* sibling;
-  struct xml_tag* child;
+  xml_tag* parent;
+  xml_tag* sibling;
+  xml_tag* child;
 };
 
 xml_tag* xml_findfirst(xml_tag* root, const char* tagname);
index 0b419b75abf608a44ec18fd97dd04a3720174c9c..116ab8461586971f91d7440a39e2e065f51a3797 100644 (file)
@@ -96,9 +96,6 @@ wr_deinit(void)
 static void
 text_disp(const waypoint* wpt)
 {
-  int latint, lonint;
-//  char tbuf[1024];
-//  time_t tm = wpt->GetCreationTime().toTime_t();
   int32_t utmz;
   double utme, utmn;
   char utmzc;
@@ -114,9 +111,6 @@ text_disp(const waypoint* wpt)
     file_out = gbfopen(thisfname, "w", MYNAME);
   }
 
-  lonint = abs((int) wpt->longitude);
-  latint = abs((int) wpt->latitude);
-
   GPS_Math_WGS84_To_UTM_EN(wpt->latitude, wpt->longitude,
                            &utme, &utmn, &utmz, &utmzc);
   tmpout1 = pretty_deg_format(wpt->latitude, wpt->longitude, degformat[2], " ", 0);